package ru.pb.global.version_control;

import ru.pb.global.utils.ArrayUtils;

/**
 * @author: Felixx
 */
public enum GameVersion
{
	AMERIKA(0x80, 11), // ct2.4
	FREYA(0); // ct2.5

	private int _obfuscatorLength;
	private long[] _protocols;

	GameVersion(int obfuscationLength, long... range)
	{
		_obfuscatorLength = obfuscationLength;
		_protocols = range;
	}

	public boolean isInRange(long val)
	{
		return ArrayUtils.isInArray(_protocols, val);
	}

	public int getObfuscatorLength()
	{
		return _obfuscatorLength;
	}

	public long[] getVersions()
	{
		return _protocols;
	}
}